<div id="actu1" >

    <?php foreach ($detail_annonce as $an): ?>

    <?php
        $image_path = './assets/annonce/thumbs/' . $an['images'];
        $thumbs_path = base_url().'assets/annonce/thumbs/' . $an['images'];
        $image_path_full = base_url().'assets/annonce/' . $an['images'];
        $pattern = "%d/%m/%Y";
        $date_post = mdate($pattern, $an['date_posted']);
        $date_expire = mdate($pattern, $an['date_expried']);
    ?>
<div class="titre_home"><?php echo $an['title'];?></div>
<table id="resum_anonce" width="95%" cellpadding="5px">
    <tr>
    <td align="left" valign="top" >       <?php if (file_exists($image_path) && $an['images'] != null):?>
                <a href="<?php echo $image_path_full?>" id="example5" title="" ><img border="0" alt="" src="<?php echo $thumbs_path; ?>"></a><br/>
                <?php endif;?>
                </td>
        
   <td align="left" valign="top"><span style="font-size: 15px;font-weight: bold;"><?php echo $an['description']; ?></span></td>
 </tr>
</table>
<div id="detail_anonce"><?php echo $an['content'];?></div>
      
    <table align="center" class="list" width="95%">
        <tr>
            <td colspan="2" > Information d'anonce</td>
        </tr>
        <tr>
            <td  width="20%"> Identifiant:</td>
            <td> <?php echo $an['email']; ?></td>
        </tr>
        <tr>
            <td > Nom et prénom</td>
            <td> <?php echo $an['first_name'].' '.$an['last_name']; ?></td>
        </tr>
        <tr>
            <td > Date publié:</td>
            <td> <?php echo $date_post;?></td>
        </tr>
        <tr>
            <td >  Région:</td>
            <td> <?php echo $an['sub_region'];?></td>
        </tr>
       
    </table>
    <?php endforeach; ?>
</div>